/**
 * @description address model
 */

const mongoose = require("../db/index");

const addressSchema = mongoose.Schema(
  {
    username: {
      type: String,
      required: true,
    },
    city: {
      type: String,
      required: true,
    },
    department: {
      type: String,
      required: true,
    },
    houseNumber: {
      type: String,
      required: true,
    },
    name: String,
    phone: String,
  },
  { timestamps: true }
);

const addressModel = mongoose.model("address", addressSchema);

module.exports = addressModel;
